#!/usr/bin/env python
# Create: 2019/1/17
__author__ = '749B'

COURSE = "深度学习和神经网络"
PRICE = 18  # RMB
TEACHER = "David"

p0 = {'url_info': [("宣传片", "https://media.wanmen.org/6fd78c2a-fe2d-4229-a219-bed5215f18c1_pc_mid")]}

p1 = {'name': "第1讲 深度学习和神经网络", 'url_info': [
    ("1.1 神经元工作原理", "https://media.wanmen.org/1654750e-46d3-4f99-974c-c15c593a392e_pc_mid"),
    ("1.2 神经网络介绍", "https://media.wanmen.org/d221ffab-48a5-4c93-9e78-a3fd8f0242b7_pc_mid"),
    ("1.3 深度神经网络", "https://media.wanmen.org/e40ce12a-b8d1-4fed-9605-ef93c4bf216c_pc_mid"),
    ("1.4 卷积神经网络", "https://media.wanmen.org/5f6823b0-a841-4efb-a9ec-d5fd88655a3f_pc_mid"),
    ("1.5 循环神经网路", "https://media.wanmen.org/d4e86f14-655a-44ca-800a-200292464e6d_pc_mid"),
    ("1.6 生产判别式网络", "https://media.wanmen.org/ec5807bf-4d23-4ce0-a2d0-50f047b08e51_pc_mid"),
    ("1.7 深度学习的应用", "https://media.wanmen.org/fec83b97-a571-447a-b6c5-3fcc721c4ae2_pc_mid"),
    ("1.8 图片生产", "https://media.wanmen.org/175061ab-83d3-4b0b-9290-b2952431d30e_pc_mid"),
    ("1.9 课后解答", "https://media.wanmen.org/49d5e291-9635-4d3a-b7dd-c7c11bd4c620_pc_mid"),
]}

parts = [p0, p1]
URLS = [(part.get('name'), item[0], item[1]) for part in parts for item in part.get('url_info')]

if __name__ == '__main__':
    from utils import check_url
    starts = 'https://media.wanmen.org/'
    ends = '_pc_mid'
    check_url.check([i[2] for i in URLS], starts, ends)
    print("视频数量:", len(URLS))
